import * as proxy from '@/constants/proxy'
import request from '@/utils/request'
import { exportMethod } from '@/utils/utils'

//获取详情
export function getDetail(id: any) {
  return request({
    url: '/checc-api/technologyStrength/kgptKjslTchieveDouble/getTotalList',
    method: 'post',
  })
}
// 列表数据
export function getList(params: any) {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/getTotalList',
    method: 'post',
    params,
  })
}

// 新增
export function insert(data: any) {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/insert',
    method: 'post',
    data,
  })
}
export function edit(data: any) {
  return request({
    url: '/checc-api/kgptkjslTawardTechresult/update',
    method: 'post',
    data,
  })
}
// 删除
export function deleteAll(params: any) {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/delete',
    method: 'post',
    params,
  })
}
export function selectItemOpen(params: any) {
  return request({
    url: '/checc-api/ysgl/monthReport/select',
    method: 'post',
    params,
  })
}
export function monthReportUpdate(data: any) {
  return request({
    url: '/checc-api/kgptKjslTchieveSttrans/update',
    method: 'post',
    data,
  })
}
export function monthReportInsert(data: any) {
  return request({
    url: '/checc-api/kgptKjslTchieveSttrans/insert',
    method: 'post',
    data,
  })
}
export function getOrgInfo() {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/getTotalList',
    method: 'post',
  })
}
// 获取活动分类
export function getClassname() {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/classname',
    method: 'post',
  })
}

// 获取大赛类别
export function getCompetitionclass() {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/competitionclass',
    method: 'post',
  })
}

// 获取承担单位
export function getUndertakeunit() {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/undertakeunit',
    method: 'post',
  })
}
// 获取承担单位
export function getOrgsByLoginUser() {
  return request({
    url: '/checc-api/kjsl/common/getOrgsByLoginUser',
    method: 'get',
  })
}
// 获取参与人员列表
export function getJoinPersons(data: any) {
  return request({
    url: '/checc-api/user/pageList',
    method: 'post',
    data,
  })
}

// 获取获奖等级列表
export function getAwardLevel() {
  return request({
    url: '/checc-api/kgptKjslTchieveDouble/getAwardLevel',
    method: 'post',
  })
}

// 数字化经费
export function databasedList(params) {
  return request({
    url: '/checc-api/ysgl/databased/list',
    method: 'post',
    params,
  })
}
export function getTotalList(params) {
  return request({
    url: '/checc-api/ysgl/databased/getTotalList',
    method: 'post',
    params,
  })
}
export function databasedinsert(data) {
  return request({
    url: '/checc-api/ysgl/databased/insert',
    method: 'post',
    data,
  })
}
export function databaseddelete(data) {
  return request({
    url: '/checc-api/ysgl/databased/delete',
    method: 'post',
    data,
  })
}
export function getAccountType() {
  return request({
    url: '/checc-api/ysgl/databased/getAccountType',
    method: 'post',
  })
}
export function databasedupdate(params) {
  return request({
    url: '/checc-api/ysgl/databased/update',
    method: 'post',
    params,
  })
}

// kgptKjslTawardTechtalent/insert /checc-api/kgptKjslTawardTechtalent/insert

// export function insert2(params) {
//   return request({
//     url: '/checc-api/kgptKjslTawardTechtalent/insert',
//     method: 'post',
//     params,
//   })
// }

export function TechteamInsert(data: any) {
  return request({
    url: '/checc-api/kgptKjslTawardTechteam/insert',
    method: 'post',
    data,
  })
}
export function update(data: any) {
  return request({
    url: '/checc-api/kgptKjslTawardTechtalent/update',
    method: 'post',
    data,
  })
}
//锁定
export function getInnovativeTalentTeamLock(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveSttrans/locale?id=${id}`,
    method: 'post',
  })
}

//解锁
export function getInnovativeTalentTeamUnlock(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveSttrans/jslocale?id=${id}`,
    method: 'post',
  })
}
/* //删除
export function deleteInnovativeTalentTeam(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveDouble/delete?id=${id}`,
    method: 'delete',
  })
} */
//删除
export function getKgptKjslTchieveSttransDelete(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveDouble/delete?id=${id}`,
    method: 'post',
  })
}

export function deleteList(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveDouble/delete?id=${id}`,
    method: 'post',
  })
}
//确认
export function getInnovativeTalentTeamConfirm(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/confirm?id=${id}`,
    method: 'get',
  })
}
//专业导出
export function getExportInnovativeTalentTeam(data: any) {
  const params = {
    method: 'post',
    url: proxy.CHECC_API_CMS + '/kgptKjslTchieveSttrans/export',
    data: data,
    fileName: '专业转化业绩',
  }
  return exportMethod(params)
}
//双创导出
export function getTeam(data: any) {
  const params = {
    method: 'post',
    url: proxy.CHECC_API_CMS + '/kgptKjslTchieveDouble/export',
    data: data,
    fileName: '双创活动业绩表格',
  }
  return exportMethod(params)
}
//根据id获取详情
export function getInnovativeTalentTeamDetail(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kjsl/InnovativeTalentTeam/getDetailById/${id}`,
    method: 'get',
  })
}


export function getConfirms(id: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveSttrans/submit?id=${id}`,
    method: 'post',
  })
}
//根据id获取详情  --专业转化
export function getProfessionalDetail(data: any) {
  return request({
    url: proxy.CHECC_API_CMS + `/kgptKjslTchieveSttrans/getOneList`,
    method: 'post',
    data: data,
  })
}
